<template>
  <div>
    <h1 ref="hello">num:{{ num }}</h1>
    <Count ref="CountComp" />
    <button @click="num++">按钮</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';

export default defineComponent({
  name: 'App',
});
</script>

<script setup lang="ts">
import Count from '@/components/Count/index.vue';
import { onMounted, ref, provide } from 'vue';

const num = ref(0);
const hello = ref('world');
provide('num', num);
provide('hello', hello);
</script>

<style lang="scss"></style>
